#include<stdio.h>
class A
{
    public:
        void Set();
        friend class B;   //same as friend_fuc
    private:
        int X, Y;
};
void A::Set()
{
    printf("A Set\n");
}
class B
{
    public:
        void Set();
        void Display();
    private:
        A a;
};
void B::Set()
{
    printf("B Set\n");
}
void B::Display()
{
    a.X = 1;
    printf("B Display\n");
}
int main(int argc, char *argv[])
{
    return 0;
}
